<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="__IMAGES__/favicon.ico" rel="icon">
    <title>{$title.value}</title>
    <link rel="stylesheet" href="__LIBS__/layui/css/layui.css"/>
    <link rel="stylesheet" href="__MODULE__/admin.css?v=317"/>
    <link rel="stylesheet" href="__CSS__/font-awesome.min.css"><!--fontAwesome图标库-->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 头部 -->
    <div class="layui-header">
        <div class="layui-logo">
            <img src="__IMAGES__/logo.png"/>
            <cite>{$title.value}</cite>
        </div>
        <ul class="layui-nav layui-layout-left">
             <li class="layui-nav-item" lay-unselect>
                <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="message" title="消息">
                    <i class="layui-icon layui-icon-notice"></i>
                    <span class="layui-badge-dot"></span>
                </a>
            </li>
<!--            <li class="layui-nav-item" lay-unselect>-->
<!--                <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a>-->
<!--            </li>-->
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="clear" title="清除缓存"><i class="layui-icon layui-icon-delete"></i></a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="lockScreen" title="锁屏"><i class="layui-icon layui-icon-password"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a>
                    <img src="__IMAGES__/head.jpg" class="layui-nav-img">
                    <cite>{$admin_name}</cite>
                </a>
                <dl class="layui-nav-child">
                    <dd lay-unselect><a ew-href="page/template/user-info.html">个人中心</a></dd>
                    <dd lay-unselect><a ew-event="psw">修改密码</a></dd>
                    <hr>
                    <dd lay-unselect><a ew-event="logout" data-url="{:url('admin/login/loginOut')}">退出</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="theme" data-url="{:url('admin/Index/theme')}" title="主题"><i class="layui-icon layui-icon-more-vertical"></i></a>
            </li>
        </ul>
    </div>

    <div class="layui-side">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="admin-side-nav" lay-shrink="_all">
                {if !empty($menu)}
                {foreach name="menu" item="vo"}
                <li class="layui-nav-item">
                    {if condition="$vo.name eq '#'"}
                    <a href="javascript:;"><i class="{$vo.css} layui-font"></i>&emsp;<cite>{$vo.title}</cite></a>
                    {else /}
                    <a lay-href="{$vo.href}"><i class="{$vo.css} layui-font"></i>&emsp;<cite>{$vo.title}</cite></a>
                    {/if}
                    {if condition="$vo.name eq '#'"}
                    <dl class="layui-nav-child">
                        {if !empty($vo['child'])}
                        {foreach name="$vo['child']" item="v"}
                        {if condition="$v.name neq '##'"}
                        <dd data-name="console">
                            <a lay-href="{$v.href}">{$v.title}</a>
                        </dd>
                        {else /}
                        <dd data-name="grid">
                            <a href="javascript:;">{$v.title}<span class="layui-nav-more"></span></a>
                            <dl class="layui-nav-child">
                                {if !empty($v['child'])}
                                {foreach name="$v['child']" item="z"}
                                <dd data-name="list"><a lay-href="{$z.href}">{$z.title}</a></dd>
                                {/foreach}
                                {/if}
                            </dl>
                        </dd>
                        {/if}
                        {/foreach}
                        {/if}
                    </dl>
                    {/if}
                </li>
                {/foreach}
                {/if}
            </ul>
        </div>
    </div>
    <!-- 主体部分 -->
    <div class="layui-body"></div>
    <!-- 底部 -->
    <div class="layui-footer layui-text">
        {$copyright['value']}
        <span class="pull-right">Version {$version['value']}</span>
    </div>
</div>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="__LIBS__/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="__LIBS__/layui/layui.js"></script>
<script type="text/javascript" src="__NJS__/common.js?v=317"></script>
<script>

    layui.use(['index'], function () {
        var $ = layui.jquery;
        var index = layui.index;

        // 默认加载主页
        index.loadHome({
            menuPath: "{:url('admin/Index/indexPage')}",
            menuName: '<i class="layui-icon layui-icon-home"></i>'
        });

    });
    // $(".page li").click(function(){
    //     $(".page li a").css({"background-color":"#191a23"})
    //     $(this).children().css({"background-color":"#009688"})
    //     $(this).siblings().children().css({"background-color":"#191a23"})
    // })

</script>
</body>
</html>